package com.design.strategy;

public abstract class Role {

    protected String name;

    protected IAttackBebavior iAttackBebavior;
    protected IDefendBehavior iDefendBehavior;
    protected IDisplayBehavior iDisplayBehavior;
    protected IRunBehavior iRunBehavior;

    protected void attack(){
        iAttackBebavior.attack();
    }
    protected void defend(){
        iDefendBehavior.defend();
    }
    protected void display(){
        iDisplayBehavior.display();
    }
    protected void run(){
        iRunBehavior.run();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public IAttackBebavior getiAttackBebavior() {
        return iAttackBebavior;
    }

    public void setiAttackBebavior(IAttackBebavior iAttackBebavior) {
        this.iAttackBebavior = iAttackBebavior;
    }

    public IDefendBehavior getiDefendBehavior() {
        return iDefendBehavior;
    }

    public void setiDefendBehavior(IDefendBehavior iDefendBehavior) {
        this.iDefendBehavior = iDefendBehavior;
    }

    public IDisplayBehavior getiDisplayBehavior() {
        return iDisplayBehavior;
    }

    public void setiDisplayBehavior(IDisplayBehavior iDisplayBehavior) {
        this.iDisplayBehavior = iDisplayBehavior;
    }

    public IRunBehavior getiRunBehavior() {
        return iRunBehavior;
    }

    public void setiRunBehavior(IRunBehavior iRunBehavior) {
        this.iRunBehavior = iRunBehavior;
    }
}
